class Dog:
    # 类属性（所有实例共享）
    species = 'Canis familiaris'

    def __init__(self, name, age):
        # 实例属性（每个实例独立）
        self.name = name
        self.age = age

    # 方法
    def bark(self):
        return f'{self.name} say woof!'

dog1 = Dog('canddy', 2)
dog2 = Dog('maomao', 3)

print(dog1.name)
print(dog1.species)
print(dog2.age)
print(dog2.species)
print(dog1.bark())